Add hostname to lockfile dependencies - #29
Merged
nodeselector merged 5 commits intoSep 8, 2026
Conversation
Introduce lockfile schema v0.0.3 with a required canonical hostname on every dependency. Preserve hostnames from new lockfiles and default v0.0.1/v0.0.2 dotcom-only entries to github.com in memory. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Ensure equivalent pin casing cannot skip required action-field checks during scoped parsing. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Null dependency values can bypass required hostname validation, including during scoped parsing.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review tier: Balanced
Findings: 1
New issues introduced by this change (1)
| Severity | Finding |
|---|---|
go/pkg/lockfile/compat.go — A referenced dependency with a null YAML value bypasses all required-field validation: yaml.v3… |
What changed in this PR
Adds lockfile schema v0.0.3 with per-dependency hostnames while retaining compatibility with earlier schemas.
Changes:
- Adds and embeds the v0.0.3 schema.
- Preserves v0.0.3 hostnames and defaults legacy files to
github.com. - Updates scoped validation, tests, benchmarks, and documentation.
| File | Description |
|---|---|
schema/lockfile-v0.0.3.json |
Defines schema v0.0.3. |
README.md |
Documents hostname support. |
go/pkg/lockfile/schema.go |
Exposes the latest schema. |
go/pkg/lockfile/schema_test.go |
Tests schema and hostname validation. |
go/pkg/lockfile/schema_gen.go |
Embeds the generated schema. |
go/pkg/lockfile/lockfile.go |
Adds hostname metadata and validation. |
go/pkg/lockfile/internal/cmd/genschema/main.go |
Generates all schema constants. |
go/pkg/lockfile/compat.go |
Adds v0.0.3 and legacy migration support. |
go/pkg/lockfile/compat_test.go |
Tests compatibility behavior. |
go/pkg/lockfile/bench_test.go |
Updates benchmarks for v0.0.3. |
Files not reviewed (2)
- go/pkg/lockfile/internal/cmd/genschema/main.go: Generated file
- go/pkg/lockfile/schema_gen.go: Generated file
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Traverse each selected workflow's reachable uses graph before applying schema-specific dependency validation. Reject malformed dependency bodies and non-string hostnames while preserving scoped fail-open behavior. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Allow dotcom-only v0.0.3 lockfiles to omit hostname while retaining strict validation when the field is present. Preserve legacy normalization and scoped graph validation. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2f6db8ef-20bf-421d-878b-6d044d3865ea
nodeselector
reviewed
Sep 4, 2026
Accept only github.com or canonical GHE tenant hostnames when hostname is present. Restore the v0.0.2 benchmark baseline alongside v0.0.3 for compatibility comparisons. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2f6db8ef-20bf-421d-878b-6d044d3865ea
nodeselector
approved these changes
Sep 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
hostnameon each dependencygithub.comor a lowercase<tenant>.ghe.comhostnamegithub.comin memory without changing either published schema or the source lockfileAction.UsesgraphThis is the first
actions-lockfilestep for github/actions-dispatch#1126. Hostname-aware Proxima producers will record the resolved hostname for every direct and transitive dependency. Reader support still needs to roll out beforegh-actions-lockstarts writing v0.0.3.Testing
go test ./... -count=1go vet ./...bash script/release_test